/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/
import * as $protobuf from "protobufjs/minimal";

// Common aliases
const $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;

// Exported root namespace
const $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});

export const pb = $root.pb = (() => {

    /**
     * Namespace pb.
     * @exports pb
     * @namespace
     */
    const pb = {};

    pb.Config = (function() {

        /**
         * Properties of a Config.
         * @memberof pb
         * @interface IConfig
         * @property {Array.<string>|null} [paths] Config paths
         * @property {string|null} [version] Config version
         * @property {string|null} [buildTime] Config buildTime
         * @property {string|null} [gitCommit] Config gitCommit
         * @property {number|null} [port] Config port
         * @property {boolean|null} [debug] Config debug
         * @property {number|Long|null} [maxFileSize] Config maxFileSize
         * @property {number|Long|null} [maxTextLine] Config maxTextLine
         * @property {number|Long|null} [maxFolderSize] Config maxFolderSize
         */

        /**
         * Constructs a new Config.
         * @memberof pb
         * @classdesc Represents a Config.
         * @implements IConfig
         * @constructor
         * @param {pb.IConfig=} [properties] Properties to set
         */
        function Config(properties) {
            this.paths = [];
            if (properties)
                for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * Config paths.
         * @member {Array.<string>} paths
         * @memberof pb.Config
         * @instance
         */
        Config.prototype.paths = $util.emptyArray;

        /**
         * Config version.
         * @member {string} version
         * @memberof pb.Config
         * @instance
         */
        Config.prototype.version = "";

        /**
         * Config buildTime.
         * @member {string} buildTime
         * @memberof pb.Config
         * @instance
         */
        Config.prototype.buildTime = "";

        /**
         * Config gitCommit.
         * @member {string} gitCommit
         * @memberof pb.Config
         * @instance
         */
        Config.prototype.gitCommit = "";

        /**
         * Config port.
         * @member {number} port
         * @memberof pb.Config
         * @instance
         */
        Config.prototype.port = 0;

        /**
         * Config debug.
         * @member {boolean} debug
         * @memberof pb.Config
         * @instance
         */
        Config.prototype.debug = false;

        /**
         * Config maxFileSize.
         * @member {number|Long} maxFileSize
         * @memberof pb.Config
         * @instance
         */
        Config.prototype.maxFileSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * Config maxTextLine.
         * @member {number|Long} maxTextLine
         * @memberof pb.Config
         * @instance
         */
        Config.prototype.maxTextLine = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * Config maxFolderSize.
         * @member {number|Long} maxFolderSize
         * @memberof pb.Config
         * @instance
         */
        Config.prototype.maxFolderSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * Creates a new Config instance using the specified properties.
         * @function create
         * @memberof pb.Config
         * @static
         * @param {pb.IConfig=} [properties] Properties to set
         * @returns {pb.Config} Config instance
         */
        Config.create = function create(properties) {
            return new Config(properties);
        };

        /**
         * Encodes the specified Config message. Does not implicitly {@link pb.Config.verify|verify} messages.
         * @function encode
         * @memberof pb.Config
         * @static
         * @param {pb.IConfig} message Config message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Config.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.version != null && Object.hasOwnProperty.call(message, "version"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.version);
            if (message.buildTime != null && Object.hasOwnProperty.call(message, "buildTime"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.buildTime);
            if (message.gitCommit != null && Object.hasOwnProperty.call(message, "gitCommit"))
                writer.uint32(/* id 3, wireType 2 =*/26).string(message.gitCommit);
            if (message.port != null && Object.hasOwnProperty.call(message, "port"))
                writer.uint32(/* id 4, wireType 0 =*/32).int32(message.port);
            if (message.debug != null && Object.hasOwnProperty.call(message, "debug"))
                writer.uint32(/* id 5, wireType 0 =*/40).bool(message.debug);
            if (message.maxFileSize != null && Object.hasOwnProperty.call(message, "maxFileSize"))
                writer.uint32(/* id 6, wireType 0 =*/48).int64(message.maxFileSize);
            if (message.maxTextLine != null && Object.hasOwnProperty.call(message, "maxTextLine"))
                writer.uint32(/* id 7, wireType 0 =*/56).int64(message.maxTextLine);
            if (message.maxFolderSize != null && Object.hasOwnProperty.call(message, "maxFolderSize"))
                writer.uint32(/* id 8, wireType 0 =*/64).int64(message.maxFolderSize);
            if (message.paths != null && message.paths.length)
                for (let i = 0; i < message.paths.length; ++i)
                    writer.uint32(/* id 9, wireType 2 =*/74).string(message.paths[i]);
            return writer;
        };

        /**
         * Encodes the specified Config message, length delimited. Does not implicitly {@link pb.Config.verify|verify} messages.
         * @function encodeDelimited
         * @memberof pb.Config
         * @static
         * @param {pb.IConfig} message Config message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Config.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a Config message from the specified reader or buffer.
         * @function decode
         * @memberof pb.Config
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {pb.Config} Config
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Config.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pb.Config();
            while (reader.pos < end) {
                let tag = reader.uint32();
                switch (tag >>> 3) {
                case 9:
                    if (!(message.paths && message.paths.length))
                        message.paths = [];
                    message.paths.push(reader.string());
                    break;
                case 1:
                    message.version = reader.string();
                    break;
                case 2:
                    message.buildTime = reader.string();
                    break;
                case 3:
                    message.gitCommit = reader.string();
                    break;
                case 4:
                    message.port = reader.int32();
                    break;
                case 5:
                    message.debug = reader.bool();
                    break;
                case 6:
                    message.maxFileSize = reader.int64();
                    break;
                case 7:
                    message.maxTextLine = reader.int64();
                    break;
                case 8:
                    message.maxFolderSize = reader.int64();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a Config message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof pb.Config
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {pb.Config} Config
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Config.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a Config message.
         * @function verify
         * @memberof pb.Config
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        Config.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.paths != null && message.hasOwnProperty("paths")) {
                if (!Array.isArray(message.paths))
                    return "paths: array expected";
                for (let i = 0; i < message.paths.length; ++i)
                    if (!$util.isString(message.paths[i]))
                        return "paths: string[] expected";
            }
            if (message.version != null && message.hasOwnProperty("version"))
                if (!$util.isString(message.version))
                    return "version: string expected";
            if (message.buildTime != null && message.hasOwnProperty("buildTime"))
                if (!$util.isString(message.buildTime))
                    return "buildTime: string expected";
            if (message.gitCommit != null && message.hasOwnProperty("gitCommit"))
                if (!$util.isString(message.gitCommit))
                    return "gitCommit: string expected";
            if (message.port != null && message.hasOwnProperty("port"))
                if (!$util.isInteger(message.port))
                    return "port: integer expected";
            if (message.debug != null && message.hasOwnProperty("debug"))
                if (typeof message.debug !== "boolean")
                    return "debug: boolean expected";
            if (message.maxFileSize != null && message.hasOwnProperty("maxFileSize"))
                if (!$util.isInteger(message.maxFileSize) && !(message.maxFileSize && $util.isInteger(message.maxFileSize.low) && $util.isInteger(message.maxFileSize.high)))
                    return "maxFileSize: integer|Long expected";
            if (message.maxTextLine != null && message.hasOwnProperty("maxTextLine"))
                if (!$util.isInteger(message.maxTextLine) && !(message.maxTextLine && $util.isInteger(message.maxTextLine.low) && $util.isInteger(message.maxTextLine.high)))
                    return "maxTextLine: integer|Long expected";
            if (message.maxFolderSize != null && message.hasOwnProperty("maxFolderSize"))
                if (!$util.isInteger(message.maxFolderSize) && !(message.maxFolderSize && $util.isInteger(message.maxFolderSize.low) && $util.isInteger(message.maxFolderSize.high)))
                    return "maxFolderSize: integer|Long expected";
            return null;
        };

        /**
         * Creates a Config message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof pb.Config
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {pb.Config} Config
         */
        Config.fromObject = function fromObject(object) {
            if (object instanceof $root.pb.Config)
                return object;
            let message = new $root.pb.Config();
            if (object.paths) {
                if (!Array.isArray(object.paths))
                    throw TypeError(".pb.Config.paths: array expected");
                message.paths = [];
                for (let i = 0; i < object.paths.length; ++i)
                    message.paths[i] = String(object.paths[i]);
            }
            if (object.version != null)
                message.version = String(object.version);
            if (object.buildTime != null)
                message.buildTime = String(object.buildTime);
            if (object.gitCommit != null)
                message.gitCommit = String(object.gitCommit);
            if (object.port != null)
                message.port = object.port | 0;
            if (object.debug != null)
                message.debug = Boolean(object.debug);
            if (object.maxFileSize != null)
                if ($util.Long)
                    (message.maxFileSize = $util.Long.fromValue(object.maxFileSize)).unsigned = false;
                else if (typeof object.maxFileSize === "string")
                    message.maxFileSize = parseInt(object.maxFileSize, 10);
                else if (typeof object.maxFileSize === "number")
                    message.maxFileSize = object.maxFileSize;
                else if (typeof object.maxFileSize === "object")
                    message.maxFileSize = new $util.LongBits(object.maxFileSize.low >>> 0, object.maxFileSize.high >>> 0).toNumber();
            if (object.maxTextLine != null)
                if ($util.Long)
                    (message.maxTextLine = $util.Long.fromValue(object.maxTextLine)).unsigned = false;
                else if (typeof object.maxTextLine === "string")
                    message.maxTextLine = parseInt(object.maxTextLine, 10);
                else if (typeof object.maxTextLine === "number")
                    message.maxTextLine = object.maxTextLine;
                else if (typeof object.maxTextLine === "object")
                    message.maxTextLine = new $util.LongBits(object.maxTextLine.low >>> 0, object.maxTextLine.high >>> 0).toNumber();
            if (object.maxFolderSize != null)
                if ($util.Long)
                    (message.maxFolderSize = $util.Long.fromValue(object.maxFolderSize)).unsigned = false;
                else if (typeof object.maxFolderSize === "string")
                    message.maxFolderSize = parseInt(object.maxFolderSize, 10);
                else if (typeof object.maxFolderSize === "number")
                    message.maxFolderSize = object.maxFolderSize;
                else if (typeof object.maxFolderSize === "object")
                    message.maxFolderSize = new $util.LongBits(object.maxFolderSize.low >>> 0, object.maxFolderSize.high >>> 0).toNumber();
            return message;
        };

        /**
         * Creates a plain object from a Config message. Also converts values to other types if specified.
         * @function toObject
         * @memberof pb.Config
         * @static
         * @param {pb.Config} message Config
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        Config.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            let object = {};
            if (options.arrays || options.defaults)
                object.paths = [];
            if (options.defaults) {
                object.version = "";
                object.buildTime = "";
                object.gitCommit = "";
                object.port = 0;
                object.debug = false;
                if ($util.Long) {
                    let long = new $util.Long(0, 0, false);
                    object.maxFileSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.maxFileSize = options.longs === String ? "0" : 0;
                if ($util.Long) {
                    let long = new $util.Long(0, 0, false);
                    object.maxTextLine = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.maxTextLine = options.longs === String ? "0" : 0;
                if ($util.Long) {
                    let long = new $util.Long(0, 0, false);
                    object.maxFolderSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.maxFolderSize = options.longs === String ? "0" : 0;
            }
            if (message.version != null && message.hasOwnProperty("version"))
                object.version = message.version;
            if (message.buildTime != null && message.hasOwnProperty("buildTime"))
                object.buildTime = message.buildTime;
            if (message.gitCommit != null && message.hasOwnProperty("gitCommit"))
                object.gitCommit = message.gitCommit;
            if (message.port != null && message.hasOwnProperty("port"))
                object.port = message.port;
            if (message.debug != null && message.hasOwnProperty("debug"))
                object.debug = message.debug;
            if (message.maxFileSize != null && message.hasOwnProperty("maxFileSize"))
                if (typeof message.maxFileSize === "number")
                    object.maxFileSize = options.longs === String ? String(message.maxFileSize) : message.maxFileSize;
                else
                    object.maxFileSize = options.longs === String ? $util.Long.prototype.toString.call(message.maxFileSize) : options.longs === Number ? new $util.LongBits(message.maxFileSize.low >>> 0, message.maxFileSize.high >>> 0).toNumber() : message.maxFileSize;
            if (message.maxTextLine != null && message.hasOwnProperty("maxTextLine"))
                if (typeof message.maxTextLine === "number")
                    object.maxTextLine = options.longs === String ? String(message.maxTextLine) : message.maxTextLine;
                else
                    object.maxTextLine = options.longs === String ? $util.Long.prototype.toString.call(message.maxTextLine) : options.longs === Number ? new $util.LongBits(message.maxTextLine.low >>> 0, message.maxTextLine.high >>> 0).toNumber() : message.maxTextLine;
            if (message.maxFolderSize != null && message.hasOwnProperty("maxFolderSize"))
                if (typeof message.maxFolderSize === "number")
                    object.maxFolderSize = options.longs === String ? String(message.maxFolderSize) : message.maxFolderSize;
                else
                    object.maxFolderSize = options.longs === String ? $util.Long.prototype.toString.call(message.maxFolderSize) : options.longs === Number ? new $util.LongBits(message.maxFolderSize.low >>> 0, message.maxFolderSize.high >>> 0).toNumber() : message.maxFolderSize;
            if (message.paths && message.paths.length) {
                object.paths = [];
                for (let j = 0; j < message.paths.length; ++j)
                    object.paths[j] = message.paths[j];
            }
            return object;
        };

        /**
         * Converts this Config to JSON.
         * @function toJSON
         * @memberof pb.Config
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        Config.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        return Config;
    })();

    pb.Error = (function() {

        /**
         * Properties of an Error.
         * @memberof pb
         * @interface IError
         * @property {string|null} [error] Error error
         */

        /**
         * Constructs a new Error.
         * @memberof pb
         * @classdesc Represents an Error.
         * @implements IError
         * @constructor
         * @param {pb.IError=} [properties] Properties to set
         */
        function Error(properties) {
            if (properties)
                for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * Error error.
         * @member {string} error
         * @memberof pb.Error
         * @instance
         */
        Error.prototype.error = "";

        /**
         * Creates a new Error instance using the specified properties.
         * @function create
         * @memberof pb.Error
         * @static
         * @param {pb.IError=} [properties] Properties to set
         * @returns {pb.Error} Error instance
         */
        Error.create = function create(properties) {
            return new Error(properties);
        };

        /**
         * Encodes the specified Error message. Does not implicitly {@link pb.Error.verify|verify} messages.
         * @function encode
         * @memberof pb.Error
         * @static
         * @param {pb.IError} message Error message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Error.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.error != null && Object.hasOwnProperty.call(message, "error"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.error);
            return writer;
        };

        /**
         * Encodes the specified Error message, length delimited. Does not implicitly {@link pb.Error.verify|verify} messages.
         * @function encodeDelimited
         * @memberof pb.Error
         * @static
         * @param {pb.IError} message Error message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Error.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes an Error message from the specified reader or buffer.
         * @function decode
         * @memberof pb.Error
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {pb.Error} Error
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Error.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pb.Error();
            while (reader.pos < end) {
                let tag = reader.uint32();
                switch (tag >>> 3) {
                case 1:
                    message.error = reader.string();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes an Error message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof pb.Error
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {pb.Error} Error
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Error.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies an Error message.
         * @function verify
         * @memberof pb.Error
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        Error.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.error != null && message.hasOwnProperty("error"))
                if (!$util.isString(message.error))
                    return "error: string expected";
            return null;
        };

        /**
         * Creates an Error message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof pb.Error
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {pb.Error} Error
         */
        Error.fromObject = function fromObject(object) {
            if (object instanceof $root.pb.Error)
                return object;
            let message = new $root.pb.Error();
            if (object.error != null)
                message.error = String(object.error);
            return message;
        };

        /**
         * Creates a plain object from an Error message. Also converts values to other types if specified.
         * @function toObject
         * @memberof pb.Error
         * @static
         * @param {pb.Error} message Error
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        Error.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            let object = {};
            if (options.defaults)
                object.error = "";
            if (message.error != null && message.hasOwnProperty("error"))
                object.error = message.error;
            return object;
        };

        /**
         * Converts this Error to JSON.
         * @function toJSON
         * @memberof pb.Error
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        Error.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        return Error;
    })();

    pb.FileInfo = (function() {

        /**
         * Properties of a FileInfo.
         * @memberof pb
         * @interface IFileInfo
         * @property {string|null} [id] FileInfo id
         * @property {string|null} [name] FileInfo name
         * @property {string|null} [path] FileInfo path
         * @property {number|Long|null} [size] FileInfo size
         * @property {number|Long|null} [modTime] FileInfo modTime
         * @property {boolean|null} [isDir] FileInfo isDir
         * @property {pb.FileType|null} [type] FileInfo type
         * @property {string|null} [archive] FileInfo archive
         * @property {pb.ArchiveType|null} [archiveType] FileInfo archiveType
         */

        /**
         * Constructs a new FileInfo.
         * @memberof pb
         * @classdesc Represents a FileInfo.
         * @implements IFileInfo
         * @constructor
         * @param {pb.IFileInfo=} [properties] Properties to set
         */
        function FileInfo(properties) {
            if (properties)
                for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * FileInfo id.
         * @member {string} id
         * @memberof pb.FileInfo
         * @instance
         */
        FileInfo.prototype.id = "";

        /**
         * FileInfo name.
         * @member {string} name
         * @memberof pb.FileInfo
         * @instance
         */
        FileInfo.prototype.name = "";

        /**
         * FileInfo path.
         * @member {string} path
         * @memberof pb.FileInfo
         * @instance
         */
        FileInfo.prototype.path = "";

        /**
         * FileInfo size.
         * @member {number|Long} size
         * @memberof pb.FileInfo
         * @instance
         */
        FileInfo.prototype.size = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * FileInfo modTime.
         * @member {number|Long} modTime
         * @memberof pb.FileInfo
         * @instance
         */
        FileInfo.prototype.modTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * FileInfo isDir.
         * @member {boolean} isDir
         * @memberof pb.FileInfo
         * @instance
         */
        FileInfo.prototype.isDir = false;

        /**
         * FileInfo type.
         * @member {pb.FileType} type
         * @memberof pb.FileInfo
         * @instance
         */
        FileInfo.prototype.type = 0;

        /**
         * FileInfo archive.
         * @member {string} archive
         * @memberof pb.FileInfo
         * @instance
         */
        FileInfo.prototype.archive = "";

        /**
         * FileInfo archiveType.
         * @member {pb.ArchiveType} archiveType
         * @memberof pb.FileInfo
         * @instance
         */
        FileInfo.prototype.archiveType = 0;

        /**
         * Creates a new FileInfo instance using the specified properties.
         * @function create
         * @memberof pb.FileInfo
         * @static
         * @param {pb.IFileInfo=} [properties] Properties to set
         * @returns {pb.FileInfo} FileInfo instance
         */
        FileInfo.create = function create(properties) {
            return new FileInfo(properties);
        };

        /**
         * Encodes the specified FileInfo message. Does not implicitly {@link pb.FileInfo.verify|verify} messages.
         * @function encode
         * @memberof pb.FileInfo
         * @static
         * @param {pb.IFileInfo} message FileInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        FileInfo.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.id != null && Object.hasOwnProperty.call(message, "id"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.id);
            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.name);
            if (message.path != null && Object.hasOwnProperty.call(message, "path"))
                writer.uint32(/* id 3, wireType 2 =*/26).string(message.path);
            if (message.size != null && Object.hasOwnProperty.call(message, "size"))
                writer.uint32(/* id 4, wireType 0 =*/32).int64(message.size);
            if (message.modTime != null && Object.hasOwnProperty.call(message, "modTime"))
                writer.uint32(/* id 5, wireType 0 =*/40).int64(message.modTime);
            if (message.isDir != null && Object.hasOwnProperty.call(message, "isDir"))
                writer.uint32(/* id 6, wireType 0 =*/48).bool(message.isDir);
            if (message.type != null && Object.hasOwnProperty.call(message, "type"))
                writer.uint32(/* id 7, wireType 0 =*/56).int32(message.type);
            if (message.archive != null && Object.hasOwnProperty.call(message, "archive"))
                writer.uint32(/* id 8, wireType 2 =*/66).string(message.archive);
            if (message.archiveType != null && Object.hasOwnProperty.call(message, "archiveType"))
                writer.uint32(/* id 9, wireType 0 =*/72).int32(message.archiveType);
            return writer;
        };

        /**
         * Encodes the specified FileInfo message, length delimited. Does not implicitly {@link pb.FileInfo.verify|verify} messages.
         * @function encodeDelimited
         * @memberof pb.FileInfo
         * @static
         * @param {pb.IFileInfo} message FileInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        FileInfo.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a FileInfo message from the specified reader or buffer.
         * @function decode
         * @memberof pb.FileInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {pb.FileInfo} FileInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        FileInfo.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pb.FileInfo();
            while (reader.pos < end) {
                let tag = reader.uint32();
                switch (tag >>> 3) {
                case 1:
                    message.id = reader.string();
                    break;
                case 2:
                    message.name = reader.string();
                    break;
                case 3:
                    message.path = reader.string();
                    break;
                case 4:
                    message.size = reader.int64();
                    break;
                case 5:
                    message.modTime = reader.int64();
                    break;
                case 6:
                    message.isDir = reader.bool();
                    break;
                case 7:
                    message.type = reader.int32();
                    break;
                case 8:
                    message.archive = reader.string();
                    break;
                case 9:
                    message.archiveType = reader.int32();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a FileInfo message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof pb.FileInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {pb.FileInfo} FileInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        FileInfo.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a FileInfo message.
         * @function verify
         * @memberof pb.FileInfo
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        FileInfo.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.id != null && message.hasOwnProperty("id"))
                if (!$util.isString(message.id))
                    return "id: string expected";
            if (message.name != null && message.hasOwnProperty("name"))
                if (!$util.isString(message.name))
                    return "name: string expected";
            if (message.path != null && message.hasOwnProperty("path"))
                if (!$util.isString(message.path))
                    return "path: string expected";
            if (message.size != null && message.hasOwnProperty("size"))
                if (!$util.isInteger(message.size) && !(message.size && $util.isInteger(message.size.low) && $util.isInteger(message.size.high)))
                    return "size: integer|Long expected";
            if (message.modTime != null && message.hasOwnProperty("modTime"))
                if (!$util.isInteger(message.modTime) && !(message.modTime && $util.isInteger(message.modTime.low) && $util.isInteger(message.modTime.high)))
                    return "modTime: integer|Long expected";
            if (message.isDir != null && message.hasOwnProperty("isDir"))
                if (typeof message.isDir !== "boolean")
                    return "isDir: boolean expected";
            if (message.type != null && message.hasOwnProperty("type"))
                switch (message.type) {
                default:
                    return "type: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                case 4:
                case 5:
                case 6:
                case 7:
                case 8:
                case 9:
                case 10:
                    break;
                }
            if (message.archive != null && message.hasOwnProperty("archive"))
                if (!$util.isString(message.archive))
                    return "archive: string expected";
            if (message.archiveType != null && message.hasOwnProperty("archiveType"))
                switch (message.archiveType) {
                default:
                    return "archiveType: enum value expected";
                case 0:
                case 1:
                case 2:
                    break;
                }
            return null;
        };

        /**
         * Creates a FileInfo message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof pb.FileInfo
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {pb.FileInfo} FileInfo
         */
        FileInfo.fromObject = function fromObject(object) {
            if (object instanceof $root.pb.FileInfo)
                return object;
            let message = new $root.pb.FileInfo();
            if (object.id != null)
                message.id = String(object.id);
            if (object.name != null)
                message.name = String(object.name);
            if (object.path != null)
                message.path = String(object.path);
            if (object.size != null)
                if ($util.Long)
                    (message.size = $util.Long.fromValue(object.size)).unsigned = false;
                else if (typeof object.size === "string")
                    message.size = parseInt(object.size, 10);
                else if (typeof object.size === "number")
                    message.size = object.size;
                else if (typeof object.size === "object")
                    message.size = new $util.LongBits(object.size.low >>> 0, object.size.high >>> 0).toNumber();
            if (object.modTime != null)
                if ($util.Long)
                    (message.modTime = $util.Long.fromValue(object.modTime)).unsigned = false;
                else if (typeof object.modTime === "string")
                    message.modTime = parseInt(object.modTime, 10);
                else if (typeof object.modTime === "number")
                    message.modTime = object.modTime;
                else if (typeof object.modTime === "object")
                    message.modTime = new $util.LongBits(object.modTime.low >>> 0, object.modTime.high >>> 0).toNumber();
            if (object.isDir != null)
                message.isDir = Boolean(object.isDir);
            switch (object.type) {
            case "unknown":
            case 0:
                message.type = 0;
                break;
            case "text":
            case 1:
                message.type = 1;
                break;
            case "code":
            case 2:
                message.type = 2;
                break;
            case "image":
            case 3:
                message.type = 3;
                break;
            case "video":
            case 4:
                message.type = 4;
                break;
            case "audio":
            case 5:
                message.type = 5;
                break;
            case "archive":
            case 6:
                message.type = 6;
                break;
            case "document":
            case 7:
                message.type = 7;
                break;
            case "pdf":
            case 8:
                message.type = 8;
                break;
            case "font":
            case 9:
                message.type = 9;
                break;
            case "application":
            case 10:
                message.type = 10;
                break;
            }
            if (object.archive != null)
                message.archive = String(object.archive);
            switch (object.archiveType) {
            case "none":
            case 0:
                message.archiveType = 0;
                break;
            case "zip":
            case 1:
                message.archiveType = 1;
                break;
            case "gzip":
            case 2:
                message.archiveType = 2;
                break;
            }
            return message;
        };

        /**
         * Creates a plain object from a FileInfo message. Also converts values to other types if specified.
         * @function toObject
         * @memberof pb.FileInfo
         * @static
         * @param {pb.FileInfo} message FileInfo
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        FileInfo.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            let object = {};
            if (options.defaults) {
                object.id = "";
                object.name = "";
                object.path = "";
                if ($util.Long) {
                    let long = new $util.Long(0, 0, false);
                    object.size = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.size = options.longs === String ? "0" : 0;
                if ($util.Long) {
                    let long = new $util.Long(0, 0, false);
                    object.modTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.modTime = options.longs === String ? "0" : 0;
                object.isDir = false;
                object.type = options.enums === String ? "unknown" : 0;
                object.archive = "";
                object.archiveType = options.enums === String ? "none" : 0;
            }
            if (message.id != null && message.hasOwnProperty("id"))
                object.id = message.id;
            if (message.name != null && message.hasOwnProperty("name"))
                object.name = message.name;
            if (message.path != null && message.hasOwnProperty("path"))
                object.path = message.path;
            if (message.size != null && message.hasOwnProperty("size"))
                if (typeof message.size === "number")
                    object.size = options.longs === String ? String(message.size) : message.size;
                else
                    object.size = options.longs === String ? $util.Long.prototype.toString.call(message.size) : options.longs === Number ? new $util.LongBits(message.size.low >>> 0, message.size.high >>> 0).toNumber() : message.size;
            if (message.modTime != null && message.hasOwnProperty("modTime"))
                if (typeof message.modTime === "number")
                    object.modTime = options.longs === String ? String(message.modTime) : message.modTime;
                else
                    object.modTime = options.longs === String ? $util.Long.prototype.toString.call(message.modTime) : options.longs === Number ? new $util.LongBits(message.modTime.low >>> 0, message.modTime.high >>> 0).toNumber() : message.modTime;
            if (message.isDir != null && message.hasOwnProperty("isDir"))
                object.isDir = message.isDir;
            if (message.type != null && message.hasOwnProperty("type"))
                object.type = options.enums === String ? $root.pb.FileType[message.type] : message.type;
            if (message.archive != null && message.hasOwnProperty("archive"))
                object.archive = message.archive;
            if (message.archiveType != null && message.hasOwnProperty("archiveType"))
                object.archiveType = options.enums === String ? $root.pb.ArchiveType[message.archiveType] : message.archiveType;
            return object;
        };

        /**
         * Converts this FileInfo to JSON.
         * @function toJSON
         * @memberof pb.FileInfo
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        FileInfo.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        return FileInfo;
    })();

    /**
     * ArchiveType enum.
     * @name pb.ArchiveType
     * @enum {number}
     * @property {number} none=0 none value
     * @property {number} zip=1 zip value
     * @property {number} gzip=2 gzip value
     */
    pb.ArchiveType = (function() {
        const valuesById = {}, values = Object.create(valuesById);
        values[valuesById[0] = "none"] = 0;
        values[valuesById[1] = "zip"] = 1;
        values[valuesById[2] = "gzip"] = 2;
        return values;
    })();

    /**
     * FileType enum.
     * @name pb.FileType
     * @enum {number}
     * @property {number} unknown=0 unknown value
     * @property {number} text=1 text value
     * @property {number} code=2 code value
     * @property {number} image=3 image value
     * @property {number} video=4 video value
     * @property {number} audio=5 audio value
     * @property {number} archive=6 archive value
     * @property {number} document=7 document value
     * @property {number} pdf=8 pdf value
     * @property {number} font=9 font value
     * @property {number} application=10 application value
     */
    pb.FileType = (function() {
        const valuesById = {}, values = Object.create(valuesById);
        values[valuesById[0] = "unknown"] = 0;
        values[valuesById[1] = "text"] = 1;
        values[valuesById[2] = "code"] = 2;
        values[valuesById[3] = "image"] = 3;
        values[valuesById[4] = "video"] = 4;
        values[valuesById[5] = "audio"] = 5;
        values[valuesById[6] = "archive"] = 6;
        values[valuesById[7] = "document"] = 7;
        values[valuesById[8] = "pdf"] = 8;
        values[valuesById[9] = "font"] = 9;
        values[valuesById[10] = "application"] = 10;
        return values;
    })();

    pb.Folder = (function() {

        /**
         * Properties of a Folder.
         * @memberof pb
         * @interface IFolder
         * @property {string|null} [id] Folder id
         * @property {string|null} [path] Folder path
         * @property {Array.<pb.IFileInfo>|null} [files] Folder files
         * @property {number|Long|null} [offset] Folder offset
         * @property {boolean|null} [next] Folder next
         */

        /**
         * Constructs a new Folder.
         * @memberof pb
         * @classdesc Represents a Folder.
         * @implements IFolder
         * @constructor
         * @param {pb.IFolder=} [properties] Properties to set
         */
        function Folder(properties) {
            this.files = [];
            if (properties)
                for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * Folder id.
         * @member {string} id
         * @memberof pb.Folder
         * @instance
         */
        Folder.prototype.id = "";

        /**
         * Folder path.
         * @member {string} path
         * @memberof pb.Folder
         * @instance
         */
        Folder.prototype.path = "";

        /**
         * Folder files.
         * @member {Array.<pb.IFileInfo>} files
         * @memberof pb.Folder
         * @instance
         */
        Folder.prototype.files = $util.emptyArray;

        /**
         * Folder offset.
         * @member {number|Long} offset
         * @memberof pb.Folder
         * @instance
         */
        Folder.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * Folder next.
         * @member {boolean} next
         * @memberof pb.Folder
         * @instance
         */
        Folder.prototype.next = false;

        /**
         * Creates a new Folder instance using the specified properties.
         * @function create
         * @memberof pb.Folder
         * @static
         * @param {pb.IFolder=} [properties] Properties to set
         * @returns {pb.Folder} Folder instance
         */
        Folder.create = function create(properties) {
            return new Folder(properties);
        };

        /**
         * Encodes the specified Folder message. Does not implicitly {@link pb.Folder.verify|verify} messages.
         * @function encode
         * @memberof pb.Folder
         * @static
         * @param {pb.IFolder} message Folder message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Folder.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.id != null && Object.hasOwnProperty.call(message, "id"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.id);
            if (message.path != null && Object.hasOwnProperty.call(message, "path"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.path);
            if (message.files != null && message.files.length)
                for (let i = 0; i < message.files.length; ++i)
                    $root.pb.FileInfo.encode(message.files[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
            if (message.next != null && Object.hasOwnProperty.call(message, "next"))
                writer.uint32(/* id 4, wireType 0 =*/32).bool(message.next);
            if (message.offset != null && Object.hasOwnProperty.call(message, "offset"))
                writer.uint32(/* id 5, wireType 0 =*/40).int64(message.offset);
            return writer;
        };

        /**
         * Encodes the specified Folder message, length delimited. Does not implicitly {@link pb.Folder.verify|verify} messages.
         * @function encodeDelimited
         * @memberof pb.Folder
         * @static
         * @param {pb.IFolder} message Folder message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Folder.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a Folder message from the specified reader or buffer.
         * @function decode
         * @memberof pb.Folder
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {pb.Folder} Folder
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Folder.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pb.Folder();
            while (reader.pos < end) {
                let tag = reader.uint32();
                switch (tag >>> 3) {
                case 1:
                    message.id = reader.string();
                    break;
                case 2:
                    message.path = reader.string();
                    break;
                case 3:
                    if (!(message.files && message.files.length))
                        message.files = [];
                    message.files.push($root.pb.FileInfo.decode(reader, reader.uint32()));
                    break;
                case 5:
                    message.offset = reader.int64();
                    break;
                case 4:
                    message.next = reader.bool();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a Folder message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof pb.Folder
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {pb.Folder} Folder
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Folder.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a Folder message.
         * @function verify
         * @memberof pb.Folder
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        Folder.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.id != null && message.hasOwnProperty("id"))
                if (!$util.isString(message.id))
                    return "id: string expected";
            if (message.path != null && message.hasOwnProperty("path"))
                if (!$util.isString(message.path))
                    return "path: string expected";
            if (message.files != null && message.hasOwnProperty("files")) {
                if (!Array.isArray(message.files))
                    return "files: array expected";
                for (let i = 0; i < message.files.length; ++i) {
                    let error = $root.pb.FileInfo.verify(message.files[i]);
                    if (error)
                        return "files." + error;
                }
            }
            if (message.offset != null && message.hasOwnProperty("offset"))
                if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high)))
                    return "offset: integer|Long expected";
            if (message.next != null && message.hasOwnProperty("next"))
                if (typeof message.next !== "boolean")
                    return "next: boolean expected";
            return null;
        };

        /**
         * Creates a Folder message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof pb.Folder
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {pb.Folder} Folder
         */
        Folder.fromObject = function fromObject(object) {
            if (object instanceof $root.pb.Folder)
                return object;
            let message = new $root.pb.Folder();
            if (object.id != null)
                message.id = String(object.id);
            if (object.path != null)
                message.path = String(object.path);
            if (object.files) {
                if (!Array.isArray(object.files))
                    throw TypeError(".pb.Folder.files: array expected");
                message.files = [];
                for (let i = 0; i < object.files.length; ++i) {
                    if (typeof object.files[i] !== "object")
                        throw TypeError(".pb.Folder.files: object expected");
                    message.files[i] = $root.pb.FileInfo.fromObject(object.files[i]);
                }
            }
            if (object.offset != null)
                if ($util.Long)
                    (message.offset = $util.Long.fromValue(object.offset)).unsigned = false;
                else if (typeof object.offset === "string")
                    message.offset = parseInt(object.offset, 10);
                else if (typeof object.offset === "number")
                    message.offset = object.offset;
                else if (typeof object.offset === "object")
                    message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber();
            if (object.next != null)
                message.next = Boolean(object.next);
            return message;
        };

        /**
         * Creates a plain object from a Folder message. Also converts values to other types if specified.
         * @function toObject
         * @memberof pb.Folder
         * @static
         * @param {pb.Folder} message Folder
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        Folder.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            let object = {};
            if (options.arrays || options.defaults)
                object.files = [];
            if (options.defaults) {
                object.id = "";
                object.path = "";
                object.next = false;
                if ($util.Long) {
                    let long = new $util.Long(0, 0, false);
                    object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.offset = options.longs === String ? "0" : 0;
            }
            if (message.id != null && message.hasOwnProperty("id"))
                object.id = message.id;
            if (message.path != null && message.hasOwnProperty("path"))
                object.path = message.path;
            if (message.files && message.files.length) {
                object.files = [];
                for (let j = 0; j < message.files.length; ++j)
                    object.files[j] = $root.pb.FileInfo.toObject(message.files[j], options);
            }
            if (message.next != null && message.hasOwnProperty("next"))
                object.next = message.next;
            if (message.offset != null && message.hasOwnProperty("offset"))
                if (typeof message.offset === "number")
                    object.offset = options.longs === String ? String(message.offset) : message.offset;
                else
                    object.offset = options.longs === String ? $util.Long.prototype.toString.call(message.offset) : options.longs === Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber() : message.offset;
            return object;
        };

        /**
         * Converts this Folder to JSON.
         * @function toJSON
         * @memberof pb.Folder
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        Folder.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        return Folder;
    })();

    pb.Language = (function() {

        /**
         * Properties of a Language.
         * @memberof pb
         * @interface ILanguage
         * @property {string|null} [code] Language code
         * @property {string|null} [label] Language label
         * @property {Array.<string>|null} [ext] Language ext
         */

        /**
         * Constructs a new Language.
         * @memberof pb
         * @classdesc Represents a Language.
         * @implements ILanguage
         * @constructor
         * @param {pb.ILanguage=} [properties] Properties to set
         */
        function Language(properties) {
            this.ext = [];
            if (properties)
                for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * Language code.
         * @member {string} code
         * @memberof pb.Language
         * @instance
         */
        Language.prototype.code = "";

        /**
         * Language label.
         * @member {string} label
         * @memberof pb.Language
         * @instance
         */
        Language.prototype.label = "";

        /**
         * Language ext.
         * @member {Array.<string>} ext
         * @memberof pb.Language
         * @instance
         */
        Language.prototype.ext = $util.emptyArray;

        /**
         * Creates a new Language instance using the specified properties.
         * @function create
         * @memberof pb.Language
         * @static
         * @param {pb.ILanguage=} [properties] Properties to set
         * @returns {pb.Language} Language instance
         */
        Language.create = function create(properties) {
            return new Language(properties);
        };

        /**
         * Encodes the specified Language message. Does not implicitly {@link pb.Language.verify|verify} messages.
         * @function encode
         * @memberof pb.Language
         * @static
         * @param {pb.ILanguage} message Language message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Language.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.code != null && Object.hasOwnProperty.call(message, "code"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.code);
            if (message.label != null && Object.hasOwnProperty.call(message, "label"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.label);
            if (message.ext != null && message.ext.length)
                for (let i = 0; i < message.ext.length; ++i)
                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.ext[i]);
            return writer;
        };

        /**
         * Encodes the specified Language message, length delimited. Does not implicitly {@link pb.Language.verify|verify} messages.
         * @function encodeDelimited
         * @memberof pb.Language
         * @static
         * @param {pb.ILanguage} message Language message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Language.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a Language message from the specified reader or buffer.
         * @function decode
         * @memberof pb.Language
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {pb.Language} Language
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Language.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pb.Language();
            while (reader.pos < end) {
                let tag = reader.uint32();
                switch (tag >>> 3) {
                case 1:
                    message.code = reader.string();
                    break;
                case 2:
                    message.label = reader.string();
                    break;
                case 3:
                    if (!(message.ext && message.ext.length))
                        message.ext = [];
                    message.ext.push(reader.string());
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a Language message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof pb.Language
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {pb.Language} Language
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Language.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a Language message.
         * @function verify
         * @memberof pb.Language
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        Language.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.code != null && message.hasOwnProperty("code"))
                if (!$util.isString(message.code))
                    return "code: string expected";
            if (message.label != null && message.hasOwnProperty("label"))
                if (!$util.isString(message.label))
                    return "label: string expected";
            if (message.ext != null && message.hasOwnProperty("ext")) {
                if (!Array.isArray(message.ext))
                    return "ext: array expected";
                for (let i = 0; i < message.ext.length; ++i)
                    if (!$util.isString(message.ext[i]))
                        return "ext: string[] expected";
            }
            return null;
        };

        /**
         * Creates a Language message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof pb.Language
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {pb.Language} Language
         */
        Language.fromObject = function fromObject(object) {
            if (object instanceof $root.pb.Language)
                return object;
            let message = new $root.pb.Language();
            if (object.code != null)
                message.code = String(object.code);
            if (object.label != null)
                message.label = String(object.label);
            if (object.ext) {
                if (!Array.isArray(object.ext))
                    throw TypeError(".pb.Language.ext: array expected");
                message.ext = [];
                for (let i = 0; i < object.ext.length; ++i)
                    message.ext[i] = String(object.ext[i]);
            }
            return message;
        };

        /**
         * Creates a plain object from a Language message. Also converts values to other types if specified.
         * @function toObject
         * @memberof pb.Language
         * @static
         * @param {pb.Language} message Language
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        Language.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            let object = {};
            if (options.arrays || options.defaults)
                object.ext = [];
            if (options.defaults) {
                object.code = "";
                object.label = "";
            }
            if (message.code != null && message.hasOwnProperty("code"))
                object.code = message.code;
            if (message.label != null && message.hasOwnProperty("label"))
                object.label = message.label;
            if (message.ext && message.ext.length) {
                object.ext = [];
                for (let j = 0; j < message.ext.length; ++j)
                    object.ext[j] = message.ext[j];
            }
            return object;
        };

        /**
         * Converts this Language to JSON.
         * @function toJSON
         * @memberof pb.Language
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        Language.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        return Language;
    })();

    pb.Msg = (function() {

        /**
         * Properties of a Msg.
         * @memberof pb
         * @interface IMsg
         * @property {pb.MsgType|null} [type] Msg type
         * @property {string|null} [id] Msg id
         * @property {number|null} [interval] Msg interval
         */

        /**
         * Constructs a new Msg.
         * @memberof pb
         * @classdesc Represents a Msg.
         * @implements IMsg
         * @constructor
         * @param {pb.IMsg=} [properties] Properties to set
         */
        function Msg(properties) {
            if (properties)
                for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * Msg type.
         * @member {pb.MsgType} type
         * @memberof pb.Msg
         * @instance
         */
        Msg.prototype.type = 0;

        /**
         * Msg id.
         * @member {string} id
         * @memberof pb.Msg
         * @instance
         */
        Msg.prototype.id = "";

        /**
         * Msg interval.
         * @member {number} interval
         * @memberof pb.Msg
         * @instance
         */
        Msg.prototype.interval = 0;

        /**
         * Creates a new Msg instance using the specified properties.
         * @function create
         * @memberof pb.Msg
         * @static
         * @param {pb.IMsg=} [properties] Properties to set
         * @returns {pb.Msg} Msg instance
         */
        Msg.create = function create(properties) {
            return new Msg(properties);
        };

        /**
         * Encodes the specified Msg message. Does not implicitly {@link pb.Msg.verify|verify} messages.
         * @function encode
         * @memberof pb.Msg
         * @static
         * @param {pb.IMsg} message Msg message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Msg.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.type != null && Object.hasOwnProperty.call(message, "type"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type);
            if (message.id != null && Object.hasOwnProperty.call(message, "id"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.id);
            if (message.interval != null && Object.hasOwnProperty.call(message, "interval"))
                writer.uint32(/* id 3, wireType 0 =*/24).int32(message.interval);
            return writer;
        };

        /**
         * Encodes the specified Msg message, length delimited. Does not implicitly {@link pb.Msg.verify|verify} messages.
         * @function encodeDelimited
         * @memberof pb.Msg
         * @static
         * @param {pb.IMsg} message Msg message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Msg.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a Msg message from the specified reader or buffer.
         * @function decode
         * @memberof pb.Msg
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {pb.Msg} Msg
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Msg.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pb.Msg();
            while (reader.pos < end) {
                let tag = reader.uint32();
                switch (tag >>> 3) {
                case 1:
                    message.type = reader.int32();
                    break;
                case 2:
                    message.id = reader.string();
                    break;
                case 3:
                    message.interval = reader.int32();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a Msg message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof pb.Msg
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {pb.Msg} Msg
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Msg.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a Msg message.
         * @function verify
         * @memberof pb.Msg
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        Msg.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.type != null && message.hasOwnProperty("type"))
                switch (message.type) {
                default:
                    return "type: enum value expected";
                case 0:
                case 1:
                case 2:
                case 3:
                    break;
                }
            if (message.id != null && message.hasOwnProperty("id"))
                if (!$util.isString(message.id))
                    return "id: string expected";
            if (message.interval != null && message.hasOwnProperty("interval"))
                if (!$util.isInteger(message.interval))
                    return "interval: integer expected";
            return null;
        };

        /**
         * Creates a Msg message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof pb.Msg
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {pb.Msg} Msg
         */
        Msg.fromObject = function fromObject(object) {
            if (object instanceof $root.pb.Msg)
                return object;
            let message = new $root.pb.Msg();
            switch (object.type) {
            case "init":
            case 0:
                message.type = 0;
                break;
            case "open":
            case 1:
                message.type = 1;
                break;
            case "close":
            case 2:
                message.type = 2;
                break;
            case "write":
            case 3:
                message.type = 3;
                break;
            }
            if (object.id != null)
                message.id = String(object.id);
            if (object.interval != null)
                message.interval = object.interval | 0;
            return message;
        };

        /**
         * Creates a plain object from a Msg message. Also converts values to other types if specified.
         * @function toObject
         * @memberof pb.Msg
         * @static
         * @param {pb.Msg} message Msg
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        Msg.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            let object = {};
            if (options.defaults) {
                object.type = options.enums === String ? "init" : 0;
                object.id = "";
                object.interval = 0;
            }
            if (message.type != null && message.hasOwnProperty("type"))
                object.type = options.enums === String ? $root.pb.MsgType[message.type] : message.type;
            if (message.id != null && message.hasOwnProperty("id"))
                object.id = message.id;
            if (message.interval != null && message.hasOwnProperty("interval"))
                object.interval = message.interval;
            return object;
        };

        /**
         * Converts this Msg to JSON.
         * @function toJSON
         * @memberof pb.Msg
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        Msg.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        return Msg;
    })();

    /**
     * MsgType enum.
     * @name pb.MsgType
     * @enum {number}
     * @property {number} init=0 init value
     * @property {number} open=1 open value
     * @property {number} close=2 close value
     * @property {number} write=3 write value
     */
    pb.MsgType = (function() {
        const valuesById = {}, values = Object.create(valuesById);
        values[valuesById[0] = "init"] = 0;
        values[valuesById[1] = "open"] = 1;
        values[valuesById[2] = "close"] = 2;
        values[valuesById[3] = "write"] = 3;
        return values;
    })();

    pb.Settings = (function() {

        /**
         * Properties of a Settings.
         * @memberof pb
         * @interface ISettings
         * @property {string|null} [theme] Settings theme
         * @property {string|null} [language] Settings language
         * @property {number|null} [fontSize] Settings fontSize
         * @property {boolean|null} [readOnly] Settings readOnly
         * @property {string|null} [wordWrap] Settings wordWrap
         * @property {boolean|null} [showDate] Settings showDate
         * @property {boolean|null} [showSize] Settings showSize
         * @property {boolean|null} [autoRefresh] Settings autoRefresh
         * @property {number|null} [interval] Settings interval
         * @property {boolean|null} [mouseWheelZoom] Settings mouseWheelZoom
         */

        /**
         * Constructs a new Settings.
         * @memberof pb
         * @classdesc Represents a Settings.
         * @implements ISettings
         * @constructor
         * @param {pb.ISettings=} [properties] Properties to set
         */
        function Settings(properties) {
            if (properties)
                for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * Settings theme.
         * @member {string} theme
         * @memberof pb.Settings
         * @instance
         */
        Settings.prototype.theme = "";

        /**
         * Settings language.
         * @member {string} language
         * @memberof pb.Settings
         * @instance
         */
        Settings.prototype.language = "";

        /**
         * Settings fontSize.
         * @member {number} fontSize
         * @memberof pb.Settings
         * @instance
         */
        Settings.prototype.fontSize = 0;

        /**
         * Settings readOnly.
         * @member {boolean} readOnly
         * @memberof pb.Settings
         * @instance
         */
        Settings.prototype.readOnly = false;

        /**
         * Settings wordWrap.
         * @member {string} wordWrap
         * @memberof pb.Settings
         * @instance
         */
        Settings.prototype.wordWrap = "";

        /**
         * Settings showDate.
         * @member {boolean} showDate
         * @memberof pb.Settings
         * @instance
         */
        Settings.prototype.showDate = false;

        /**
         * Settings showSize.
         * @member {boolean} showSize
         * @memberof pb.Settings
         * @instance
         */
        Settings.prototype.showSize = false;

        /**
         * Settings autoRefresh.
         * @member {boolean} autoRefresh
         * @memberof pb.Settings
         * @instance
         */
        Settings.prototype.autoRefresh = false;

        /**
         * Settings interval.
         * @member {number} interval
         * @memberof pb.Settings
         * @instance
         */
        Settings.prototype.interval = 0;

        /**
         * Settings mouseWheelZoom.
         * @member {boolean} mouseWheelZoom
         * @memberof pb.Settings
         * @instance
         */
        Settings.prototype.mouseWheelZoom = false;

        /**
         * Creates a new Settings instance using the specified properties.
         * @function create
         * @memberof pb.Settings
         * @static
         * @param {pb.ISettings=} [properties] Properties to set
         * @returns {pb.Settings} Settings instance
         */
        Settings.create = function create(properties) {
            return new Settings(properties);
        };

        /**
         * Encodes the specified Settings message. Does not implicitly {@link pb.Settings.verify|verify} messages.
         * @function encode
         * @memberof pb.Settings
         * @static
         * @param {pb.ISettings} message Settings message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Settings.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.theme != null && Object.hasOwnProperty.call(message, "theme"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.theme);
            if (message.language != null && Object.hasOwnProperty.call(message, "language"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.language);
            if (message.fontSize != null && Object.hasOwnProperty.call(message, "fontSize"))
                writer.uint32(/* id 3, wireType 0 =*/24).int32(message.fontSize);
            if (message.readOnly != null && Object.hasOwnProperty.call(message, "readOnly"))
                writer.uint32(/* id 4, wireType 0 =*/32).bool(message.readOnly);
            if (message.wordWrap != null && Object.hasOwnProperty.call(message, "wordWrap"))
                writer.uint32(/* id 5, wireType 2 =*/42).string(message.wordWrap);
            if (message.showDate != null && Object.hasOwnProperty.call(message, "showDate"))
                writer.uint32(/* id 6, wireType 0 =*/48).bool(message.showDate);
            if (message.showSize != null && Object.hasOwnProperty.call(message, "showSize"))
                writer.uint32(/* id 7, wireType 0 =*/56).bool(message.showSize);
            if (message.autoRefresh != null && Object.hasOwnProperty.call(message, "autoRefresh"))
                writer.uint32(/* id 8, wireType 0 =*/64).bool(message.autoRefresh);
            if (message.interval != null && Object.hasOwnProperty.call(message, "interval"))
                writer.uint32(/* id 9, wireType 0 =*/72).int32(message.interval);
            if (message.mouseWheelZoom != null && Object.hasOwnProperty.call(message, "mouseWheelZoom"))
                writer.uint32(/* id 10, wireType 0 =*/80).bool(message.mouseWheelZoom);
            return writer;
        };

        /**
         * Encodes the specified Settings message, length delimited. Does not implicitly {@link pb.Settings.verify|verify} messages.
         * @function encodeDelimited
         * @memberof pb.Settings
         * @static
         * @param {pb.ISettings} message Settings message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Settings.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a Settings message from the specified reader or buffer.
         * @function decode
         * @memberof pb.Settings
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {pb.Settings} Settings
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Settings.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pb.Settings();
            while (reader.pos < end) {
                let tag = reader.uint32();
                switch (tag >>> 3) {
                case 1:
                    message.theme = reader.string();
                    break;
                case 2:
                    message.language = reader.string();
                    break;
                case 3:
                    message.fontSize = reader.int32();
                    break;
                case 4:
                    message.readOnly = reader.bool();
                    break;
                case 5:
                    message.wordWrap = reader.string();
                    break;
                case 6:
                    message.showDate = reader.bool();
                    break;
                case 7:
                    message.showSize = reader.bool();
                    break;
                case 8:
                    message.autoRefresh = reader.bool();
                    break;
                case 9:
                    message.interval = reader.int32();
                    break;
                case 10:
                    message.mouseWheelZoom = reader.bool();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a Settings message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof pb.Settings
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {pb.Settings} Settings
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Settings.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a Settings message.
         * @function verify
         * @memberof pb.Settings
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        Settings.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.theme != null && message.hasOwnProperty("theme"))
                if (!$util.isString(message.theme))
                    return "theme: string expected";
            if (message.language != null && message.hasOwnProperty("language"))
                if (!$util.isString(message.language))
                    return "language: string expected";
            if (message.fontSize != null && message.hasOwnProperty("fontSize"))
                if (!$util.isInteger(message.fontSize))
                    return "fontSize: integer expected";
            if (message.readOnly != null && message.hasOwnProperty("readOnly"))
                if (typeof message.readOnly !== "boolean")
                    return "readOnly: boolean expected";
            if (message.wordWrap != null && message.hasOwnProperty("wordWrap"))
                if (!$util.isString(message.wordWrap))
                    return "wordWrap: string expected";
            if (message.showDate != null && message.hasOwnProperty("showDate"))
                if (typeof message.showDate !== "boolean")
                    return "showDate: boolean expected";
            if (message.showSize != null && message.hasOwnProperty("showSize"))
                if (typeof message.showSize !== "boolean")
                    return "showSize: boolean expected";
            if (message.autoRefresh != null && message.hasOwnProperty("autoRefresh"))
                if (typeof message.autoRefresh !== "boolean")
                    return "autoRefresh: boolean expected";
            if (message.interval != null && message.hasOwnProperty("interval"))
                if (!$util.isInteger(message.interval))
                    return "interval: integer expected";
            if (message.mouseWheelZoom != null && message.hasOwnProperty("mouseWheelZoom"))
                if (typeof message.mouseWheelZoom !== "boolean")
                    return "mouseWheelZoom: boolean expected";
            return null;
        };

        /**
         * Creates a Settings message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof pb.Settings
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {pb.Settings} Settings
         */
        Settings.fromObject = function fromObject(object) {
            if (object instanceof $root.pb.Settings)
                return object;
            let message = new $root.pb.Settings();
            if (object.theme != null)
                message.theme = String(object.theme);
            if (object.language != null)
                message.language = String(object.language);
            if (object.fontSize != null)
                message.fontSize = object.fontSize | 0;
            if (object.readOnly != null)
                message.readOnly = Boolean(object.readOnly);
            if (object.wordWrap != null)
                message.wordWrap = String(object.wordWrap);
            if (object.showDate != null)
                message.showDate = Boolean(object.showDate);
            if (object.showSize != null)
                message.showSize = Boolean(object.showSize);
            if (object.autoRefresh != null)
                message.autoRefresh = Boolean(object.autoRefresh);
            if (object.interval != null)
                message.interval = object.interval | 0;
            if (object.mouseWheelZoom != null)
                message.mouseWheelZoom = Boolean(object.mouseWheelZoom);
            return message;
        };

        /**
         * Creates a plain object from a Settings message. Also converts values to other types if specified.
         * @function toObject
         * @memberof pb.Settings
         * @static
         * @param {pb.Settings} message Settings
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        Settings.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            let object = {};
            if (options.defaults) {
                object.theme = "";
                object.language = "";
                object.fontSize = 0;
                object.readOnly = false;
                object.wordWrap = "";
                object.showDate = false;
                object.showSize = false;
                object.autoRefresh = false;
                object.interval = 0;
                object.mouseWheelZoom = false;
            }
            if (message.theme != null && message.hasOwnProperty("theme"))
                object.theme = message.theme;
            if (message.language != null && message.hasOwnProperty("language"))
                object.language = message.language;
            if (message.fontSize != null && message.hasOwnProperty("fontSize"))
                object.fontSize = message.fontSize;
            if (message.readOnly != null && message.hasOwnProperty("readOnly"))
                object.readOnly = message.readOnly;
            if (message.wordWrap != null && message.hasOwnProperty("wordWrap"))
                object.wordWrap = message.wordWrap;
            if (message.showDate != null && message.hasOwnProperty("showDate"))
                object.showDate = message.showDate;
            if (message.showSize != null && message.hasOwnProperty("showSize"))
                object.showSize = message.showSize;
            if (message.autoRefresh != null && message.hasOwnProperty("autoRefresh"))
                object.autoRefresh = message.autoRefresh;
            if (message.interval != null && message.hasOwnProperty("interval"))
                object.interval = message.interval;
            if (message.mouseWheelZoom != null && message.hasOwnProperty("mouseWheelZoom"))
                object.mouseWheelZoom = message.mouseWheelZoom;
            return object;
        };

        /**
         * Converts this Settings to JSON.
         * @function toJSON
         * @memberof pb.Settings
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        Settings.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        return Settings;
    })();

    pb.Text = (function() {

        /**
         * Properties of a Text.
         * @memberof pb
         * @interface IText
         * @property {number|Long|null} [offset] Text offset
         * @property {string|null} [context] Text context
         * @property {boolean|null} [next] Text next
         */

        /**
         * Constructs a new Text.
         * @memberof pb
         * @classdesc Represents a Text.
         * @implements IText
         * @constructor
         * @param {pb.IText=} [properties] Properties to set
         */
        function Text(properties) {
            if (properties)
                for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * Text offset.
         * @member {number|Long} offset
         * @memberof pb.Text
         * @instance
         */
        Text.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * Text context.
         * @member {string} context
         * @memberof pb.Text
         * @instance
         */
        Text.prototype.context = "";

        /**
         * Text next.
         * @member {boolean} next
         * @memberof pb.Text
         * @instance
         */
        Text.prototype.next = false;

        /**
         * Creates a new Text instance using the specified properties.
         * @function create
         * @memberof pb.Text
         * @static
         * @param {pb.IText=} [properties] Properties to set
         * @returns {pb.Text} Text instance
         */
        Text.create = function create(properties) {
            return new Text(properties);
        };

        /**
         * Encodes the specified Text message. Does not implicitly {@link pb.Text.verify|verify} messages.
         * @function encode
         * @memberof pb.Text
         * @static
         * @param {pb.IText} message Text message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Text.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.offset != null && Object.hasOwnProperty.call(message, "offset"))
                writer.uint32(/* id 2, wireType 0 =*/16).int64(message.offset);
            if (message.context != null && Object.hasOwnProperty.call(message, "context"))
                writer.uint32(/* id 5, wireType 2 =*/42).string(message.context);
            if (message.next != null && Object.hasOwnProperty.call(message, "next"))
                writer.uint32(/* id 6, wireType 0 =*/48).bool(message.next);
            return writer;
        };

        /**
         * Encodes the specified Text message, length delimited. Does not implicitly {@link pb.Text.verify|verify} messages.
         * @function encodeDelimited
         * @memberof pb.Text
         * @static
         * @param {pb.IText} message Text message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Text.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a Text message from the specified reader or buffer.
         * @function decode
         * @memberof pb.Text
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {pb.Text} Text
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Text.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pb.Text();
            while (reader.pos < end) {
                let tag = reader.uint32();
                switch (tag >>> 3) {
                case 2:
                    message.offset = reader.int64();
                    break;
                case 5:
                    message.context = reader.string();
                    break;
                case 6:
                    message.next = reader.bool();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a Text message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof pb.Text
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {pb.Text} Text
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Text.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a Text message.
         * @function verify
         * @memberof pb.Text
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        Text.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.offset != null && message.hasOwnProperty("offset"))
                if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high)))
                    return "offset: integer|Long expected";
            if (message.context != null && message.hasOwnProperty("context"))
                if (!$util.isString(message.context))
                    return "context: string expected";
            if (message.next != null && message.hasOwnProperty("next"))
                if (typeof message.next !== "boolean")
                    return "next: boolean expected";
            return null;
        };

        /**
         * Creates a Text message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof pb.Text
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {pb.Text} Text
         */
        Text.fromObject = function fromObject(object) {
            if (object instanceof $root.pb.Text)
                return object;
            let message = new $root.pb.Text();
            if (object.offset != null)
                if ($util.Long)
                    (message.offset = $util.Long.fromValue(object.offset)).unsigned = false;
                else if (typeof object.offset === "string")
                    message.offset = parseInt(object.offset, 10);
                else if (typeof object.offset === "number")
                    message.offset = object.offset;
                else if (typeof object.offset === "object")
                    message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber();
            if (object.context != null)
                message.context = String(object.context);
            if (object.next != null)
                message.next = Boolean(object.next);
            return message;
        };

        /**
         * Creates a plain object from a Text message. Also converts values to other types if specified.
         * @function toObject
         * @memberof pb.Text
         * @static
         * @param {pb.Text} message Text
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        Text.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            let object = {};
            if (options.defaults) {
                if ($util.Long) {
                    let long = new $util.Long(0, 0, false);
                    object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.offset = options.longs === String ? "0" : 0;
                object.context = "";
                object.next = false;
            }
            if (message.offset != null && message.hasOwnProperty("offset"))
                if (typeof message.offset === "number")
                    object.offset = options.longs === String ? String(message.offset) : message.offset;
                else
                    object.offset = options.longs === String ? $util.Long.prototype.toString.call(message.offset) : options.longs === Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber() : message.offset;
            if (message.context != null && message.hasOwnProperty("context"))
                object.context = message.context;
            if (message.next != null && message.hasOwnProperty("next"))
                object.next = message.next;
            return object;
        };

        /**
         * Converts this Text to JSON.
         * @function toJSON
         * @memberof pb.Text
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        Text.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        return Text;
    })();

    return pb;
})();

export { $root as default };
